import request from '@/utils/request'

// 查询
export function list(query) {
  return request({
    url: '/api/productionBases',
    method: 'get',
    params: query
  })
}
// 新增
export function add(data) {
  return request({
    url: '/api/productionBases',
    method: 'post',
    data: data
  })
}
// 修改
export function update(data) {
  return request({
    url: '/api/productionBases',
    method: 'put',
    data: data
  })
}
// 详情
export function detail(query) {
  return request({
    url: '/api/productionBases/' + query.id,
    method: 'get'
  })
}
// 删除
export function remove(query) {
  return request({
    url: '/api/productionBases/' + query.id,
    method: 'delete'
  })
}

// 生产基地树状结构
export function baseAndPondList(query) {
  return request({
    url: '/api/productionBases/culturePonds',
    method: 'get',
    params: query
  })
}